<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="button" value="von-on" @click="doIt">
        <input type="button" value="double" @dblclick="doIt">
        <h2 @click="changeFood">{{food}}</h2>
    </div>
</body>
<script src="../vue.js"></script>
<script>

    var app = new Vue({
        el: "#app",
        data: {
            food: "老八蜜汁小汉堡"
        },
        methods: {
            doIt: function () {
                alert("这是v-on指令");
            },

            changeFood: function () {
                this.food += `太好吃了！`
            }
        }
    })



</script>

</html>